﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;
using System.Drawing.Drawing2D;

namespace 易保全
{
    public partial class FrmMsg : CCSkinMain
    {
        public FrmMsg(string title,string info)
        {
            AppInfo.MsgShown = true;
            InitializeComponent();
            this.Text = title;
            this.lblInfo.Text = info;
        }

        public FrmMsg(string title, string info, int width, int height)
        {
            InitializeComponent();
            this.Text = title;
            this.lblInfo.Text = info;
            this.Width = width;
            this.Height = height;

            this.Size = new Size(width, height);
            this.lblInfo.Size = new Size(width - 53, height - 66);
            this.TitleOffset = new Point((width - 50) / 2, 0);
        }

        public FrmMsg(string title, string info, int width, int height,ContentAlignment infoAlign  )
        {
            InitializeComponent();
            this.lblInfo.TextAlign = infoAlign;
            this.Text = title;
            this.lblInfo.Text = info;
            this.Width = width;
            this.Height = height;
            this.Size = new Size(width, height);
            this.lblInfo.Size = new Size(width - 53, height - 66);
            this.TitleOffset = new Point((width - 50) / 2, 0);
        }
        private void confirmBtn_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void FrmMsg_FormClosed(object sender, FormClosedEventArgs e)
        {
            AppInfo.MsgShown = false;
        }
    }
}
